#include <QCoreApplication>
#include<iostream>
#include<memory>
using namespace std;

//void testSmartPoint(std::shared_ptr<int> ptr)
//{
//    cout << "data: " << ptr.get() << endl;
//}

#include "beverage.hpp"
#include "condimentdecorator.h"

#include "darkroast.h"
#include "decaf.h"
#include "houseblend.h"
#include "espresso.h"

#include "mocha.h"
#include "whip.h"
#include "milk.h"
#include "soy.h"


int main(int argc, char *argv[])
{
    QCoreApplication a(argc, argv);

    std::shared_ptr<Beverage> beverage(new Espresso());
    std::cout << "description: " << beverage->getDescription()
              << "       cost: " << beverage->cost()
              << std::endl;

    std::shared_ptr<Beverage> beverage2(new DarkRoast());
    beverage2 = new Mocha(beverage2.get());
    beverage2 = new Mocha(beverage2.get());
    beverage2 = new Whip(beverage2.get());

    std::cout << "description: " << beverage2->getDescription()
              << "      cost:    "        << beverage2->cost()
              << std::endl;

    std::shared_ptr<Beverage> beverage3(new HouseBlend());
    beverage3->setSize(Beverage::Size::TALL);
    beverage3 = new Soy(beverage3);
    beverage3 = new Mocha(beverage3);
    beverage3 = new Whip(beverage3);

    std::cout << "description: " << beverage3->getDescription()
              << "      cost: "        << beverage3->cost()
              << std::endl;

    return a.exec();
}
